﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" >
    
    <Color x:Key="ItemOverStroke">#FFD8F0FA</Color>
    <Color x:Key="ItemSelectStroke">#FF98DDFB</Color>
    <Color x:Key="ItemOver1">#FFF4FAFD</Color>
    <Color x:Key="ItemOver2">#FFCFEDFD</Color>
    <Color x:Key="Over1">#FFE2F5FF</Color>
    <Color x:Key="Over2">#FFC0E7FC</Color>
    <Color x:Key="Over3">#FF9EDDFF</Color>
	<Color x:Key="Press1">#FF759FB6</Color>
    <Color x:Key="Press2">#FFB6E0F6</Color>
    <Color x:Key="Press3">#FF9DD5F4</Color>
    <Color x:Key="PressStroke2">#FF2C628B</Color>
	<Color x:Key="PressStroke1">#FF1D415C</Color>
    <Color x:Key="TreeviewArrowNorm">#FF76D5FD</Color>
    <Color x:Key="TreeviewArrowOver">#FFC1EFF8</Color>
    <Color x:Key="TreeviewArrowCheck">#FF6380EE</Color>

    <SolidColorBrush x:Key="OutsideFontColor" Color="#FF000000" />
    <SolidColorBrush x:Key="hoverStroke" Color="{StaticResource ItemOverStroke}"/>
    <SolidColorBrush x:Key="selectedStroke" Color="{StaticResource ItemSelectStroke}"/>
    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
    <SolidColorBrush x:Key="btnPressStroke2" Color="{StaticResource PressStroke2}"/>
    <SolidColorBrush x:Key="treeviewArrowUnchecked" Color="{StaticResource TreeviewArrowNorm}"/>
    <SolidColorBrush x:Key="treeviewArrowHover" Color="{StaticResource TreeviewArrowOver}"/>
    <SolidColorBrush x:Key="treeviewArrowChecked" Color="{StaticResource TreeviewArrowCheck}"/>
    
    
    <LinearGradientBrush x:Key="s1" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF324D70" Offset="0.38" />
        <GradientStop Color="#FF6A8BB6" Offset="1" />
    </LinearGradientBrush>
    
	<LinearGradientBrush x:Key="BtnPressFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource Press1}" Offset="0"/>
            <GradientStop Color="{StaticResource Press2}" Offset="0.152"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Press3}" Offset="0.509"/>
    </LinearGradientBrush>
	
	 <LinearGradientBrush x:Key="btnPressBorder" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource PressStroke1}" Offset="0"/>
            <GradientStop Color="{StaticResource PressStroke2}" Offset="1"/>
     </LinearGradientBrush>
	
    <LinearGradientBrush x:Key="hoverGradient" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="{StaticResource ItemOver1}" Offset="0.5"/>
        <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
        <GradientStop Color="{StaticResource ItemOver2}" Offset="1"/>
    </LinearGradientBrush>
    
    <LinearGradientBrush x:Key="grayGradient" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF" Offset="0"/>
        <GradientStop Color="#FFEDEDED" Offset="0.171"/>
        <GradientStop Color="#FFE7E7E7" Offset="0.5"/>
        <GradientStop Color="#FFDCDCDC" Offset="0.51"/>
        <GradientStop Color="#FFEAEBEC" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="BtnOverFill" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
        <GradientStop Color="{StaticResource Over2}" Offset="0.509"/>
        <GradientStop Color="{StaticResource Over3}" Offset="1"/>
    </LinearGradientBrush>
    
    

    <DropShadowEffect x:Key="Normal"  Direction="0" BlurRadius="22" ShadowDepth="0" Opacity="0.51" Color="#FF172F0F"/>
	<Style x:Key="TabItemFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Margin="3,3,3,1" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style x:Key="Triangle" TargetType="{x:Type Path}">
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="Data" Value="M 7 0 V 10 L 20 5 Z"/>
        <Setter Property="Fill" Value="{DynamicResource s1}"/>
    </Style>
    
    
    <Style x:Key="GlassButton" TargetType="{x:Type Button}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <!-- Background Layer -->
                        <Ellipse Fill="{TemplateBinding Background}"/>
                        <!-- Refraction Layer -->
                        <Ellipse x:Name="RefractionLayer">
                            <Ellipse.Fill>
                                <RadialGradientBrush GradientOrigin="0.496,1.052">
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.5"/>
                                            <TranslateTransform X="0.02" Y="0.3"/>
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Offset="1" Color="#00000000"/>
                                    <GradientStop Offset="0.4" Color="#FFFFFFFF"/>
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <!-- Reflection Layer -->
                        <Path x:Name="ReflectionLayer" VerticalAlignment="Top" Stretch="Fill">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleY="0.5" />
                            </Path.RenderTransform>
                            <Path.Data>
                                <PathGeometry>
                                    <PathFigure IsClosed="True" StartPoint="98.999,45.499">
                                        <BezierSegment Point1="98.999,54.170" Point2="89.046,52.258" Point3="85.502,51.029"/>
                                        <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="75.860,47.685"
                                    Point2="69.111,45.196"
                                    Point3="50.167,45.196"/>
                                        <BezierSegment Point1="30.805,45.196" Point2="20.173,47.741" Point3="10.665,51.363"/>
                                        <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="7.469,52.580"
                                    Point2="1.000,53.252"
                                    Point3="1.000,44.999"/>
                                        <BezierSegment Point1="1.000,39.510" Point2="0.884,39.227" Point3="2.519,34.286"/>
                                        <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="9.106,14.370"
                                    Point2="27.875,0"
                                    Point3="50,0"/>
                                        <BezierSegment Point1="72.198,0" Point2="91.018,14.466" Point3="97.546,34.485"/>
                                        <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="99.139,39.369"
                                    Point2="98.999,40.084"
                                    Point3="98.999,45.499"/>
                                    </PathFigure>
                                </PathGeometry>
                            </Path.Data>
                            <Path.Fill>
                                <RadialGradientBrush GradientOrigin="0.498,0.526">
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform
                                       CenterX="0.5"
                                       CenterY="0.5"
                                       ScaleX="1"
                                       ScaleY="1.997"/>
                                            <TranslateTransform X="0" Y="0.5"/>
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Offset="1" Color="#FFFFFFFF"/>
                                    <GradientStop Offset="0.85" Color="#92FFFFFF"/>
                                    <GradientStop Offset="0" Color="#00000000"/>
                                </RadialGradientBrush>
                            </Path.Fill>
                        </Path>
                        <!-- ContentPresenter -->
                        <ContentPresenter Margin="0,2,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>


                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="RefractionLayer" Property="Fill">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.496,1.052">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                          CenterX="0.5"
                                          CenterY="0.5"
                                          ScaleX="1.5"
                                          ScaleY="1.5"/>
                                                <TranslateTransform X="0.02" Y="0.3"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Offset="1" Color="#00000000"/>
                                        <GradientStop Offset="0.45" Color="#FFFFFFFF"/>
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="ReflectionLayer" Property="Fill">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.498,0.526">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                          CenterX="0.5"
                                          CenterY="0.5"
                                          ScaleX="1"
                                          ScaleY="1.997"/>
                                                <TranslateTransform X="0" Y="0.5"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Offset="1" Color="#FFFFFFFF"/>
                                        <GradientStop Offset="0.85" Color="#BBFFFFFF"/>
                                        <GradientStop Offset="0" Color="#00000000"/>
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="RefractionLayer" Property="Fill">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.496,1.052">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                          CenterX="0.5"
                                          CenterY="0.5"
                                          ScaleX="1.5"
                                          ScaleY="1.5"/>
                                                <TranslateTransform X="0.02" Y="0.3"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Offset="1" Color="#00000000"/>
                                        <GradientStop Offset="0.3" Color="#FFFFFFFF"/>
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="ReflectionLayer" Property="Fill">
                                <Setter.Value>
                                    <RadialGradientBrush GradientOrigin="0.498,0.526">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform
                                          CenterX="0.5"
                                          CenterY="0.5"
                                          ScaleX="1"
                                          ScaleY="1.997"/>
                                                <TranslateTransform X="0" Y="0.5"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Offset="1" Color="#CCFFFFFF"/>
                                        <GradientStop Offset="0.85" Color="#66FFFFFF"/>
                                        <GradientStop Offset="0" Color="#00000000"/>
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
	<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#F3F3F3" Offset="0"/>
		<GradientStop Color="#EBEBEB" Offset="0.5"/>
		<GradientStop Color="#DDDDDD" Offset="0.5"/>
		<GradientStop Color="#CDCDCD" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="TabItemHotBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#EAF6FD" Offset="0.15"/>
		<GradientStop Color="#D9F0FC" Offset=".5"/>
		<GradientStop Color="#BEE6FD" Offset=".5"/>
		<GradientStop Color="#A7D9F5" Offset="1"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9"/>
	<SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1"/>
	<SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4"/>
	<SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA"/>
	<Style x:Key="TabItemStyle1" TargetType="{x:Type TabItem}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
		<Setter Property="Foreground" Value="Black"/>
		<Setter Property="Padding" Value="6,1,6,1"/>
		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabItem}">
					<Grid SnapsToDevicePixels="true">
						<Border x:Name="Bd" CornerRadius="8,8,0,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0"  Padding="{TemplateBinding Padding}">
							<Border.Background>
								<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
									<GradientStop Color="#FFFDFEFF" Offset="0"/>
									<GradientStop Color="#FFEBEBEB" Offset="0.5"/>
									<GradientStop Color="#FFD5DCEE" Offset="0.5"/>
									<GradientStop Color="#FFDDE9F7" Offset="1"/>
								</LinearGradientBrush>
							</Border.Background>
							<ContentPresenter Margin="0,5,0,0" x:Name="Content" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="true">
							<!--<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemHotBackground}"/>-->
						</Trigger>
						<Trigger Property="IsSelected" Value="true">
							<Setter Property="Panel.ZIndex" Value="1"/>
							<!--<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemSelectedBackground}"/>-->
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsSelected" Value="false"/>
								<Condition Property="IsMouseOver" Value="true"/>
							</MultiTrigger.Conditions>
							<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemHotBorderBrush}"/>
						</MultiTrigger>
						<Trigger Property="TabStripPlacement" Value="Bottom">
							<Setter Property="BorderThickness" TargetName="Bd" Value="1,0,1,1"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Left">
							<Setter Property="BorderThickness" TargetName="Bd" Value="1,1,0,1"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Right">
							<Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsSelected" Value="true"/>
								<Condition Property="TabStripPlacement" Value="Top"/>
							</MultiTrigger.Conditions>
							<Setter Property="Margin" Value="-2,-2,-2,-1"/>
							<Setter Property="Margin" TargetName="Content" Value="0,0,0,1"/>
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsSelected" Value="true"/>
								<Condition Property="TabStripPlacement" Value="Bottom"/>
							</MultiTrigger.Conditions>
							<Setter Property="Margin" Value="-2,-1,-2,-2"/>
							<Setter Property="Margin" TargetName="Content" Value="0,1,0,0"/>
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsSelected" Value="true"/>
								<Condition Property="TabStripPlacement" Value="Left"/>
							</MultiTrigger.Conditions>
							<Setter Property="Margin" Value="-2,-2,-1,-2"/>
							<Setter Property="Margin" TargetName="Content" Value="0,0,1,0"/>
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsSelected" Value="true"/>
								<Condition Property="TabStripPlacement" Value="Right"/>
							</MultiTrigger.Conditions>
							<Setter Property="Margin" Value="-1,-2,-2,-2"/>
							<Setter Property="Margin" TargetName="Content" Value="1,0,0,0"/>
						</MultiTrigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemDisabledBackground}"/>
							<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemDisabledBorderBrush}"/>
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style TargetType="{x:Type ListBox}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderBrush" Value="{StaticResource btnPressStroke2}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Grid>
                        <Border BorderThickness="{TemplateBinding BorderThickness}" Background="#FFFFFFFF" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2">
                            <ScrollViewer Margin="1"   Focusable="false" Background="{TemplateBinding Background}">

                                <StackPanel Margin="2" IsItemsHost="true"/>

                            </ScrollViewer>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false"/>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style d:IsControlPart="True" TargetType="{x:Type ListBoxItem}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Height" Value="30"/>
        <Setter Property="Padding" Value="3" />
        <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0.73"/>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0"/>
                            <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="true">
                    	<Grid.ColumnDefinitions>
                    		<ColumnDefinition Width="Auto"/>
							<ColumnDefinition/>              	
						</Grid.ColumnDefinitions>
                        <Rectangle Grid.Column="0" Grid.ColumnSpan="2" x:Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                        <Rectangle Grid.Column="0" Grid.ColumnSpan="2" x:Name="BackgroundGradientSelectedDisabled" Fill="{StaticResource grayGradient}" Stroke="#7F8E8F8F" RadiusX="2" RadiusY="2" Opacity="0"/>
                        <Rectangle Grid.Column="0" Grid.ColumnSpan="2" x:Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                        <Rectangle Grid.Column="0" Grid.ColumnSpan="2" x:Name="BackgroundHighlight" Margin="1" Stroke="#A0FFFFFF" RadiusX="1" RadiusY="1"/>
                        <Path x:Name="path" Visibility="Collapsed" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1" StrokeThickness="1" Data="M 7 0 L 10 5 L 7 10 L 20 5 Z" Fill="{DynamicResource s1}"/>
                        <ContentPresenter Grid.Column="1"
	                        	x:Name="contentPresenter"
	                        	Content="{TemplateBinding Content}"
	                        	ContentTemplate="{TemplateBinding ContentTemplate}"
	                        	HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="Center"
	                        	Margin="{TemplateBinding Padding}"/>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Visibility" Value="Visible" TargetName="path"/>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}" x:Name="SelectedOff_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}" x:Name="SelectedOn_BeginStoryboard"/>
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                            </Trigger.EnterActions>
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                            <Setter Property="Visibility" TargetName="BackgroundGradientSelected" Value="Hidden"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="DataGridRowStyle1" TargetType="{x:Type DataGridRow}">
    	<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
    	<Setter Property="SnapsToDevicePixels" Value="true"/>
    	<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
    	<Setter Property="ValidationErrorTemplate">
    		<Setter.Value>
    			<ControlTemplate>
    				<TextBlock Foreground="Red" Margin="2,0,0,0" Text="!" VerticalAlignment="Center"/>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type DataGridRow}">
    				<ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0.73"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
						
						<Border x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">

						<Grid>
							<Rectangle x:Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                                <Rectangle x:Name="BackgroundGradientSelectedDisabled" Fill="{StaticResource grayGradient}" Stroke="#7F8E8F8F" RadiusX="2" RadiusY="2" Opacity="0"/>
                                <Rectangle x:Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                                <Rectangle x:Name="BackgroundHighlight" Margin="1" Stroke="#A0FFFFFF" RadiusX="1" RadiusY="1"/>
    				        <SelectiveScrollingGrid>
    						<SelectiveScrollingGrid.ColumnDefinitions>
    							<ColumnDefinition Width="Auto"/>
    							<ColumnDefinition Width="*"/>
    						</SelectiveScrollingGrid.ColumnDefinitions>
    						<SelectiveScrollingGrid.RowDefinitions>
    							<RowDefinition Height="*"/>
    							<RowDefinition Height="Auto"/>
    						</SelectiveScrollingGrid.RowDefinitions>
    						<DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
    						<DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/>
    						<DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
    					</SelectiveScrollingGrid>
					</Grid>
					</Border>
					<ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="SelectedOff_BeginStoryboard" Storyboard="{StaticResource SelectedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="SelectedOn_BeginStoryboard" Storyboard="{StaticResource SelectedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                                <Setter Property="Visibility" TargetName="BackgroundGradientSelected" Value="Hidden"/>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true" />
                                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                                </MultiTrigger.Conditions>

                            </MultiTrigger>

                        </ControlTemplate.Triggers>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <SolidColorBrush x:Key="{x:Static DataGrid.FocusBorderBrushKey}" Color="#FF000000"/>
    <Style x:Key="DataGridCellStyle1" TargetType="{x:Type DataGridCell}">
    	<Setter Property="Background" Value="Transparent"/>
    	<Setter Property="BorderBrush" Value="Transparent"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type DataGridCell}">
                    <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
    					<ContentPresenter  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
    				</Border>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    	<Style.Triggers>
    		<Trigger Property="IsSelected" Value="True">
    			<!--<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
    			<Setter Property="Foreground" Value="{DynamicResource s1}"/>
    			<!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
    		</Trigger>
    		<Trigger Property="IsKeyboardFocusWithin" Value="True">
    			<Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
    		</Trigger>
    	</Style.Triggers>
    </Style>
    <SolidColorBrush x:Key="ToolBarButtonHoverBorder" Color="#3399FF"/>
    <SolidColorBrush x:Key="ToolBarButtonHover" Color="#C2E0FF"/>
    <SolidColorBrush x:Key="ToolBarButtonPressedBorder" Color="#3399FF"/>
    <SolidColorBrush x:Key="ToolBarButtonPressed" Color="#99CCFF"/>
	
	
    <Style x:Key="ToolBarButton" TargetType="{x:Type Button}">
    	<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    	<Setter Property="Padding" Value="2"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="Background" Value="Transparent"/>
    	<Setter Property="BorderBrush" Value="Transparent"/>
    	<Setter Property="HorizontalAlignment" Value="Center"/>
    	<Setter Property="VerticalAlignment" Value="Center"/>
    	<Setter Property="HorizontalContentAlignment" Value="Center"/>
    	<Setter Property="VerticalContentAlignment" Value="Center"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type Button}">
    				<Border x:Name="Bd" CornerRadius="4,4,4,4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
    					<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    				</Border>
    				<ControlTemplate.Triggers>
    					<Trigger Property="IsMouseOver" Value="true">
    						<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource hoverStroke}"/>
    						<Setter Property="Background" TargetName="Bd" Value="{StaticResource hoverGradient}"/>
    					</Trigger>
    					<Trigger Property="IsKeyboardFocused" Value="true">
    						<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource hoverStroke}"/>
    						<Setter Property="Background" TargetName="Bd" Value="{StaticResource hoverGradient}"/>
    					</Trigger>
    					<Trigger Property="IsPressed" Value="true">
    						<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource selectedStroke}"/>
    						<Setter Property="Background" TargetName="Bd" Value="{StaticResource BtnOverFill}"/>
    					</Trigger>
    					<Trigger Property="IsEnabled" Value="false">
    						<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    					</Trigger>
    				</ControlTemplate.Triggers>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <SolidColorBrush x:Key="ToolBarButtonChecked" Color="#E6F0FA"/>
    <Style x:Key="ToolBarToggleBtn" TargetType="{x:Type ToggleButton}">
    	<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    	<Setter Property="Padding" Value="2"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="Background" Value="Transparent"/>
    	<Setter Property="BorderBrush" Value="Transparent"/>
    	<Setter Property="HorizontalAlignment" Value="Center"/>
    	<Setter Property="VerticalAlignment" Value="Center"/>
    	<Setter Property="HorizontalContentAlignment" Value="Center"/>
    	<Setter Property="VerticalContentAlignment" Value="Center"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type ToggleButton}">
    				<Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4,4,4,4" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
    					<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    				</Border>
    				<ControlTemplate.Triggers>
    					<Trigger Property="IsChecked" Value="true">
    						<Setter Property="BorderBrush" Value="{StaticResource btnPressBorder}"/>
    						<Setter Property="Background" Value="{StaticResource BtnPressFill}"/>
    					</Trigger>
    					<Trigger Property="IsMouseOver" Value="true">
    						<Setter Property="BorderBrush" Value="{StaticResource hoverStroke}"/>
    						<Setter Property="Background" Value="{StaticResource hoverGradient}"/>
    					</Trigger>
    					<Trigger Property="IsKeyboardFocused" Value="true">
    						<Setter Property="BorderBrush" Value="{StaticResource hoverStroke}"/>
    						<Setter Property="Background" Value="{StaticResource hoverGradient}"/>
    					</Trigger>
    					<MultiTrigger>
    						<MultiTrigger.Conditions>
    							<Condition Property="IsMouseOver" Value="true"/>
    							<Condition Property="IsChecked" Value="true"/>
    						</MultiTrigger.Conditions>
    						<Setter Property="BorderBrush" Value="{StaticResource selectedStroke}"/>
    						<Setter Property="Background" Value="{StaticResource BtnOverFill}"/>
    					</MultiTrigger>
    					<MultiTrigger>
    						<MultiTrigger.Conditions>
    							<Condition Property="IsKeyboardFocused" Value="true"/>
    							<Condition Property="IsChecked" Value="true"/>
    						</MultiTrigger.Conditions>
    						<Setter Property="BorderBrush" Value="{StaticResource selectedStroke}"/>
    						<Setter Property="Background" Value="{StaticResource BtnOverFill}"/>
    					</MultiTrigger>
    					<Trigger Property="IsPressed" Value="true">
    						<Setter Property="BorderBrush" Value="{StaticResource selectedStroke}"/>
    						<Setter Property="Background" Value="{StaticResource BtnOverFill}"/>
    					</Trigger>
    					<Trigger Property="IsEnabled" Value="false">
    						<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    					</Trigger>
    				</ControlTemplate.Triggers>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>

    <Style TargetType="{x:Type TreeView}">
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="BorderBrush" Value="{StaticResource btnPressStroke2}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeView}">
                    <Grid>
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                            <ScrollViewer   Focusable="False" Background="{TemplateBinding Background}" Padding="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="False">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearTreeViewItemToggleButton" d:IsControlPart="True" TargetType="{x:Type ToggleButton}">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000" Value="{StaticResource treeviewArrowHover}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000" Value="{StaticResource treeviewArrowHover}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.4000000" Value="{StaticResource treeviewArrowChecked}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.4000000" Value="{StaticResource treeviewArrowUnchecked}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                            <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid HorizontalAlignment="Right" Margin="2,2,5,2">
                        <Path x:Name="UncheckedVisual" Height="9" Width="6" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{StaticResource treeviewArrowUnchecked}" StrokeLineJoin="Miter" Data="M 0,0 L 0,9 L 5,4.5 Z"/>
                        <Path x:Name="CheckedVisual" Height="6" Width="6" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{StaticResource treeviewArrowChecked}" StrokeLineJoin="Miter" Opacity="0" Data="M 6,0 L 6,6 L 0,6 Z"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style d:IsControlPart="True" TargetType="{x:Type TreeViewItem}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Padding" Value="5,3,15,3"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="select_gradient" Storyboard.TargetProperty="Opacity" To="1"/>
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="select_highlight" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="select_gradient" Storyboard.TargetProperty="Opacity" To="0"/>
                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="select_highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hover_gradient" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.65"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hover_gradient" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>

                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="19" Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <ToggleButton x:Name="Expander" Style="{DynamicResource NuclearTreeViewItemToggleButton}" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
                        <Rectangle x:Name="select_gradient" Grid.Column="1" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" IsHitTestVisible="False"/>
                        <Rectangle x:Name="select_highlight" Margin="1" Grid.Column="1" Stroke="#A0FFFFFF" Opacity="0"/>
                        <Rectangle x:Name="inactive" Grid.Column="1" Fill="#FF999999" Stroke="#FF333333" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" IsHitTestVisible="False"/>
                        <Rectangle x:Name="hover_gradient" Grid.Column="1" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" IsHitTestVisible="False"/>
                        <Rectangle x:Name="highlight" Grid.Column="1" Margin="1" StrokeThickness="1" RadiusX="1" RadiusY="1" Opacity="0" IsHitTestVisible="False" Stroke="#FFFFFFFF"/>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" ContentSource="Header" Grid.Column="1" Margin="{TemplateBinding Padding}" />

                        <ItemsPresenter Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" x:Name="ItemsHost"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true" SourceName="PART_Header" >
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsExpanded" Value="false">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ItemsHost"/>
                        </Trigger>
                        <Trigger Property="HasItems" Value="false">
                            <Setter Property="Visibility" Value="Hidden" TargetName="Expander"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="IsSelectionActive" Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 应该在此定义资源字典条目。-->
</ResourceDictionary>